class Solution {
    string a[10] = {"","","abc","def","ghi",
                    "jkl","mno","pqrs","tuv","wxyz"};
public:
    void Combinations(vector<string>& v,string digits,int n,string s)
    {
        if(n == digits.size())
        {
             v.push_back(s);
             return;
        }
        string current = a[(digits[n]-'0')];
        int size = current.size();
        for(int i =0;i<size;i++)
        {
            Combinations(v,digits,n+1,s + current[i]);
        }
    }
    vector<string> letterCombinations(string digits) 
    {
    vector<string> v;
    if(digits.empty())
        return v;
    Combinations(v,digits,0,"");
    return v;
    }
};
